#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "Element.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class InputPin;
class Property;

/// <summary>
/// QualifierValue
/// A QualifierValue is an Element that is used as part of LinkEndData to provide
/// the value for a single qualifier of the end given by the LinkEndData.
/// </summary>
class UMLMODEL_EXPORT QualifierValue : public Element {

public: // Constructors and destructors
    explicit QualifierValue(const QString& umlType="uml::QualifierValue");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// qualifier getter
    /// The qualifier Property for which the value is to be specified.
    /// </summary>
    shared_ptr<Property> qualifier() const;

    /// <summary>
    /// qualifier setter
    /// The qualifier Property for which the value is to be specified.
    /// </summary>
    void setQualifier(shared_ptr<Property> value);

    /// <summary>
    /// value getter
    /// The InputPin from which the specified value for the qualifier is taken.
    /// </summary>
    shared_ptr<InputPin> value() const;

    /// <summary>
    /// value setter
    /// The InputPin from which the specified value for the qualifier is taken.
    /// </summary>
    void setValue(shared_ptr<InputPin> value);

private: // Fields
    /// <summary>
    /// qualifier
    /// The qualifier Property for which the value is to be specified.
    /// </summary>
    shared_ptr<Property> qualifier_;

    /// <summary>
    /// value
    /// The InputPin from which the specified value for the qualifier is taken.
    /// </summary>
    shared_ptr<InputPin> value_;

};

} // namespace uml
